package net.yxsoft.bean.contract;

import org.web3j.abi.datatypes.DynamicBytes;
import org.web3j.abi.datatypes.DynamicStruct;
import org.web3j.abi.datatypes.generated.Uint256;

import java.math.BigInteger;

public class BaseItem extends DynamicStruct {
    public byte[] name;
    public byte[] hash;
    public BigInteger createTM;
    public byte[] remark;
    public byte[] txHash;

    public BaseItem(byte[] name, byte[] hash, BigInteger createTM, byte[] remark, byte[] txHash) {
        super(
                new DynamicBytes(name),
                new DynamicBytes(hash),
                new Uint256(createTM),
                new DynamicBytes(remark),
                new DynamicBytes(txHash));
        this.name = name;
        this.hash = hash;
        this.createTM = createTM;
        this.remark = remark;
        this.txHash = txHash;

    }

//    public BaseItem(byte[] name, byte[] hash, BigInteger createTM, byte[] remark,
//                    byte[] txHash) {
//        super(new DynamicBytes(name),new Bytes32(hash),new Uint256(createTM),new DynamicBytes(remark),new Bytes32(txHash));
//        this.name = name;
//        this.hash = hash;
//        this.createTM = createTM;
//        this.remark = remark;
//        this.txHash = txHash;
//    }
}